package src.stu23002104.chapter07;
import java.util.Arrays;
public class Demo27
{
    public static void main(String[] args) {
        	        int[] arr = { 1, 2, 3, 4 };
        	        Arrays.fill(arr, 8);       // 用8替换数组中的每个元素
        	        for (int i = 0; i < arr.length; i++) {
            	            System.out.println(i + ": " + arr[i]);
            	        }
        	    }
}
